package com.thingsgrid.appmonitor.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.thingsgrid.appmonitor.entity.Application;

/**
 * 应用状态信息mapper映射接口
 */
public interface ApplicationMapper {
	/**
	 * 应用删除
	 *
	 * @param applicationId
	 * @return
	 */
	boolean deleteByApplicationId(String applicationId, String deviceId);

	/**
	 * 应用禁用
	 *
	 * @param applicationId
	 * @return
	 */
	boolean forbiddenByApplicationId(String applicationId, String deviceId);

	/**
	 * 应用启用
	 *
	 * @param applicationId
	 * @return
	 */
	boolean startByApplicationId(String applicationId, String deviceId);

	/**
	 * 应用信息分页
	 *
	 * @param page
	 * @param deviceId
	 * @return
	 */
	Page<Application> applicationByPage(Page<Application> page, String deviceId);
	int getApplicationState(String applicationId, String deviceId);
}
